Tom,
M102 can hold for different amounts of time- The goal
is zero depending on if the cutting cycle time was faster
than the part pickup time. Pickup time varies depending on
part availability from the bowl feeder. Normally the part
is ready to go in immediately. Reading in the spindle
speed before M102 would only help if the loader wasnt
ready to load immediately. Though maybe it could be doing
that as the pick head is going in and out?
Spindle is up to speed before the blade gets close. M9
happens at the same time the cut head is exiting the
cutting area. Idea is to have the chute in a close but
safe position so it can quickly go in after the cutter is
clear.
M100 saves a time stamp to the network - Cycle Start,
and Cycle Complete. A Python program which is started by a
.BAT file.
Most variation comes from the part loader, sometimes it
has a part immediately, other times it waits a few
seconds.
Loader Positions
(running independently in a thread)
- Wait in a out
of the way position to allow parts to enter the
loading area
- Once a part
arrives - Move to the location get part (changes
on every part - value read in through text file)
- Move to a close
position to the cutting zone until it is clear
(queue position to save time)
- Move into the
cutting zone (locks a bit to prevent cutter /
unloader from entering)
CNC Cut Head (G-Code
Driven)
- Stay out of the
way if there is no part
- Cutting zone
Unloading Chute
(Positions triggered by M-Codes)
- Close to cutting zone - triggers as the cutting
head is retracted
- Cutting Zone
- Down over tote
I hope that this is all clear.
Does it appear that I am using a good approach to this
problem? I am open to suggestions to pull out any time
that I can.
Thanks,
Scott
---In
DynoMotion@yahoogroups.com,
<tk@...> wrote :
Hi Scott,
That helps. I like optimization problems like this.
But a few
more questions if possible. I'm trying to understand
the
constraints that determines what can be done in
parallel or ahead
of time. In general what varies from cycle to cycle?
A video
might be helpful :)
btw it doesn't seem like there are any complex GCode
patterns
where USB bandwidth would be an issue.
How long does M102 usually hold for?
Could the S RPM (without M3 Spindle on) be sent
before the M102
wait?
Could you explain more about M100. What is "Cycle
Data"?
What does the 10 lines of G Code do? Does it need to
wait for
the Spindle to be up to speed?
M09 - what limits when that can start moving? What is
Queue
Position?
What does the 2 lines of G Code do? Push something into
the Chute?
M5 Spindle Slow/Stop is there a need to wait for it to
Slow/Stop
What is M101 for?
I don't understand the M9 pause/following error issue.
Regards
TK
Tom,
Perhaps I can explain a bit better. My
machine has 3
parts:
- 4 Axis Coordinated motion to position a
small razor
blade
- Part loader - 1 Axis with pneumatic
pickup head
- Unloading chute - 1 Axis with pneumatic
components
The cycle time for the whole process is
4-12 seconds.
Depending on the part number, we run about
120,000
cycles each day. Cycle time is extremely
important, we
are doing multiple part changeovers one each
machine,
sometimes 2-3 per hour.
Our machine operators interface with a
web based
touch screen, they scan the bar code on the
part number,
make some adjustments and the HTML program
saves the
appropriate NC file locally. The CNC program
goes like
this:
- M102
- Holds
Program until two conditions are met
(part in
spindle, loader Clear)
- M3
S RPM
Variable- Starts Spindle
- M100
- "Execute
PC" Starts a .BAT file for a Python
program for
Cycle data
- 10
lines of
G-Code
- M09
- Moves
Unloading chute to queue position
- 2
lines of
G-Code
- M08
- Unloading
Chute In
- M5
S 750 -
Slows spindle or stops it based on a
selector
switch
- M101
- Another
"Execute PC" .BAT file
- M30
- Checks a
selector switch, if in "Auto" will
restart the
cycle DOPC(PC_COMM_EXECUTE)
The loader is running in a different
thread to
pickup and queue parts to be ready when
the cycle
restarts.
With all of these MCodes I am loosing
almost 2
seconds in wait time. Also my M9 is inside
the G-Code,
it causes a pause between .1 to .4 seconds
in the CNC
program. Seems like if there is a longer
pause it
causes a following error.
I think it may help to not send the
spindle RPM
through the G-Code, but have my INIT file
read it in
from a text file. That way the MCode would
be just
setting an IO bit and wouldnt pause the
G-Code as
long. I was thinking the same thing for
the M9 and M9
chute positions. They just set a bit and
the INIT
infinite loop will move them to the
correct positions.
Does this sound reasonable? Is there a
better way?
The loader moves to different positions
for each
part number - it reads a text file after
it completes
loading a part (4-12 seconds). Could I
have it also
read the spindle speed file and save the
value as a
global variable that is accessible to the
INIT loop
file? Will reading these two files take a
lot of
system resources from coordinated motion
that could be
happening at the same time? Maybe mess up
the cycle
restart in the M30 G-Code?
Thanks,
Scott